// components/searchnote/searchnote.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    info: {
      type: Array
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    list: [{
        image: 'http://rzico.oss-cn-shenzhen.aliyuncs.com/dinnerBar/faxian/demo/image6.png',
        title: '莆田网红店，装修真的没 的说，太复古太有感觉了',
        head: 'http://rzico.oss-cn-shenzhen.aliyuncs.com/dinnerBar/faxian/demo/header.png',
        love: 20,
        type: 'image'

      },
      {
        image: 'http://rzico.oss-cn-shenzhen.aliyuncs.com/dinnerBar/faxian/demo/image1.png',
        title: '莆田网红店，装修真的没 的说，太复古太有感觉了',
        head: 'http://rzico.oss-cn-shenzhen.aliyuncs.com/dinnerBar/faxian/demo/header.png',
        love: 23,
        type: 'image'
      },
      {
        image: 'http://rzico.oss-cn-shenzhen.aliyuncs.com/dinnerBar/faxian/demo/image4.png',
        title: '莆田网红店，装修真的没 的说，太复古太有感觉了',
        head: 'http://rzico.oss-cn-shenzhen.aliyuncs.com/dinnerBar/faxian/demo/header.png',
        love: 23,
        type: 'video'
      },
      {
        image: 'http://rzico.oss-cn-shenzhen.aliyuncs.com/dinnerBar/faxian/demo/image2.png',
        title: '莆田网红店，装修真的没 的说，太复古太有感觉了',
        head: 'http://rzico.oss-cn-shenzhen.aliyuncs.com/dinnerBar/faxian/demo/header.png',
        love: 23,
        type: 'video'
      },
      {
        image: 'http://rzico.oss-cn-shenzhen.aliyuncs.com/dinnerBar/faxian/demo/image5.png',
        title: '莆田网红店，装修真的没 的说，太复古太有感觉了',
        head: 'http://rzico.oss-cn-shenzhen.aliyuncs.com/dinnerBar/faxian/demo/header.png',
        love: 23,
        type: 'image'
      },
      {
        image: 'http://rzico.oss-cn-shenzhen.aliyuncs.com/dinnerBar/faxian/demo/image3.png',
        title: '莆田网红店，装修真的没 的说，太复古太有感觉了',
        head: 'http://rzico.oss-cn-shenzhen.aliyuncs.com/dinnerBar/faxian/demo/header.png',
        love: 23,
        type: 'image'
      },
    ],
    index: 0,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    foundClick(e) {
      console.log(this.info)
      // debugger
      let dataset = e.currentTarget.dataset
      if (dataset.linkType === 1) {
        debugger
        wx.navigateTo({
          url: '/pages/member/webview/index?url=' + dataset.linkAddress,
        })
      } else {
        wx.navigateTo({
          url: '/pages/discovery/details/details?id=' + e.currentTarget.dataset.id
        })
      }


      // wx.navigateTo({
      //   url: '/pages/discovery/details/details?id='+e.currentTarget.dataset.id
      // })  
    },
  }
})